package com.ming.easyDevelop.exception;

import com.ming.easyDevelop.utils.Interface.BaseResponseCode;
/**
 * 基本業務異常類
 */
public class BusinessException extends Exception {
    private String message;
    private Integer code;

    public BusinessException() {
        super();
    }

    public BusinessException(BaseResponseCode baseResponseCode) {
        this(baseResponseCode.getMessage(), baseResponseCode.getCode());
    }

    public BusinessException(String message, Integer code) {
        super(message);
        this.message = message;
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
